/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.home.tax.model;

import java.io.Serializable;
import javax.persistence.*;
import javax.xml.bind.annotation.XmlRootElement;
import org.hibernate.annotations.Cascade;

/**
 *
 * @author TIN Nguyen
 */
@Entity
@Table(name = "HoSo")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "HoSo.findAll", query = "SELECT h FROM HoSo h"),
    @NamedQuery(name = "HoSo.findByStt", query = "SELECT h FROM HoSo h WHERE h.stt = :stt"),
    @NamedQuery(name = "HoSo.findByCongChucGiuNS", query = "SELECT h FROM HoSo h WHERE h.congChucGiuNS = :congChucGiuNS"),
    @NamedQuery(name = "HoSo.findByTruongDoan", query = "SELECT h FROM HoSo h WHERE h.truongDoan = :truongDoan"),
    @NamedQuery(name = "HoSo.findByDateTaoHoSo", query = "SELECT h FROM HoSo h WHERE h.dateTaoHoSo = :dateTaoHoSo"),
    @NamedQuery(name = "HoSo.findByTienDo", query = "SELECT h FROM HoSo h WHERE h.tienDo = :tienDo"),
    @NamedQuery(name = "HoSo.findByDateCoQuanThueLT", query = "SELECT h FROM HoSo h WHERE h.dateCoQuanThueLT = :dateCoQuanThueLT"),
    @NamedQuery(name = "HoSo.findByDateCoQuanThue", query = "SELECT h FROM HoSo h WHERE h.dateCoQuanThue = :dateCoQuanThue"),
    @NamedQuery(name = "HoSo.findByDateTBGiaiTrinh1LT", query = "SELECT h FROM HoSo h WHERE h.dateTBGiaiTrinh1LT = :dateTBGiaiTrinh1LT"),
    @NamedQuery(name = "HoSo.findByDateTBGiaiTrinh1", query = "SELECT h FROM HoSo h WHERE h.dateTBGiaiTrinh1 = :dateTBGiaiTrinh1"),
    @NamedQuery(name = "HoSo.findByDateGiaiTrinh1LT", query = "SELECT h FROM HoSo h WHERE h.dateGiaiTrinh1LT = :dateGiaiTrinh1LT"),
    @NamedQuery(name = "HoSo.findByDateGiaiTrinh1", query = "SELECT h FROM HoSo h WHERE h.dateGiaiTrinh1 = :dateGiaiTrinh1"),
    @NamedQuery(name = "HoSo.findByDateTBGiaiTrinh2LT", query = "SELECT h FROM HoSo h WHERE h.dateTBGiaiTrinh2LT = :dateTBGiaiTrinh2LT"),
    @NamedQuery(name = "HoSo.findByDateTBGiaiTrinh2", query = "SELECT h FROM HoSo h WHERE h.dateTBGiaiTrinh2 = :dateTBGiaiTrinh2"),
    @NamedQuery(name = "HoSo.findByDateGiaiTrinh2LT", query = "SELECT h FROM HoSo h WHERE h.dateGiaiTrinh2LT = :dateGiaiTrinh2LT"),
    @NamedQuery(name = "HoSo.findByDateGiaiTrinh2", query = "SELECT h FROM HoSo h WHERE h.dateGiaiTrinh2 = :dateGiaiTrinh2"),
    @NamedQuery(name = "HoSo.findByDateXuLyLT", query = "SELECT h FROM HoSo h WHERE h.dateXuLyLT = :dateXuLyLT"),
    @NamedQuery(name = "HoSo.findByDateXuLy", query = "SELECT h FROM HoSo h WHERE h.dateXuLy = :dateXuLy"),
    @NamedQuery(name = "HoSo.findByDateBHQDLT", query = "SELECT h FROM HoSo h WHERE h.dateBHQDLT = :dateBHQDLT"),
    @NamedQuery(name = "HoSo.findByDateBHQD", query = "SELECT h FROM HoSo h WHERE h.dateBHQD = :dateBHQD"),
    @NamedQuery(name = "HoSo.findByDateKiemTraDNLT", query = "SELECT h FROM HoSo h WHERE h.dateKiemTraDNLT = :dateKiemTraDNLT"),
    @NamedQuery(name = "HoSo.findByDateKiemTraDN", query = "SELECT h FROM HoSo h WHERE h.dateKiemTraDN = :dateKiemTraDN")})
public class HoSo implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "STT")
    @GeneratedValue(strategy= GenerationType.AUTO)
    private Integer stt;
    @Basic(optional = false)
    @Column(name = "CongChucGiuNS")
    private String congChucGiuNS;
    @Basic(optional = false)
    @Column(name = "TruongDoan")
    private String truongDoan;
    @Basic(optional = false)
    @Column(name = "DateTaoHoSo")
    private String dateTaoHoSo;
    @Column(name = "TienDo")
    private String tienDo;
    @Column(name = "DateCoQuanThue_LT")
    private String dateCoQuanThueLT;
    @Column(name = "DateCoQuanThue")
    private String dateCoQuanThue;
    @Column(name = "DateTBGiaiTrinh1_LT")
    private String dateTBGiaiTrinh1LT;
    @Column(name = "DateTBGiaiTrinh1")
    private String dateTBGiaiTrinh1;
    @Column(name = "DateGiaiTrinh1_LT")
    private String dateGiaiTrinh1LT;
    @Column(name = "DateGiaiTrinh1")
    private String dateGiaiTrinh1;
    @Column(name = "DateTBGiaiTrinh2_LT")
    private String dateTBGiaiTrinh2LT;
    @Column(name = "DateTBGiaiTrinh2")
    private String dateTBGiaiTrinh2;
    @Column(name = "DateGiaiTrinh2_LT")
    private String dateGiaiTrinh2LT;
    @Column(name = "DateGiaiTrinh2")
    private String dateGiaiTrinh2;
    @Column(name = "DateXuLy_LT")
    private String dateXuLyLT;
    @Column(name = "DateXuLy")
    private String dateXuLy;
    @Column(name = "DateBHQD_LT")
    private String dateBHQDLT;
    @Column(name = "DateBHQD")
    private String dateBHQD;
    @Column(name = "DateKiemTraDN_LT")
    private String dateKiemTraDNLT;
    @Column(name = "DateKiemTraDN")
    private String dateKiemTraDN;
    @JoinColumn(name = "MaSoThue", referencedColumnName = "MaSoThue")
    @ManyToOne(optional = false)
    @Cascade(org.hibernate.annotations.CascadeType.SAVE_UPDATE)
    private DoanhNghiep maSoThue;
    @OneToOne(cascade = CascadeType.ALL, mappedBy = "hoSo")
    private KetQua ketQua;

    public HoSo() {
    }

    public HoSo(Integer stt) {
        this.stt = stt;
    }

    public HoSo(Integer stt, String congChucGiuNS, String truongDoan, String dateTaoHoSo) {
        this.stt = stt;
        this.congChucGiuNS = congChucGiuNS;
        this.truongDoan = truongDoan;
        this.dateTaoHoSo = dateTaoHoSo;
    }

    public Integer getStt() {
        return stt;
    }

    public void setStt(Integer stt) {
        this.stt = stt;
    }

    public String getCongChucGiuNS() {
        return congChucGiuNS;
    }

    public void setCongChucGiuNS(String congChucGiuNS) {
        this.congChucGiuNS = congChucGiuNS;
    }

    public String getTruongDoan() {
        return truongDoan;
    }

    public void setTruongDoan(String truongDoan) {
        this.truongDoan = truongDoan;
    }

    public String getDateTaoHoSo() {
        return dateTaoHoSo;
    }

    public void setDateTaoHoSo(String dateTaoHoSo) {
        this.dateTaoHoSo = dateTaoHoSo;
    }

    public String getTienDo() {
        return tienDo;
    }

    public void setTienDo(String tienDo) {
        this.tienDo = tienDo;
    }

    public String getDateCoQuanThueLT() {
        return dateCoQuanThueLT;
    }

    public void setDateCoQuanThueLT(String dateCoQuanThueLT) {
        this.dateCoQuanThueLT = dateCoQuanThueLT;
    }

    public String getDateCoQuanThue() {
        return dateCoQuanThue;
    }

    public void setDateCoQuanThue(String dateCoQuanThue) {
        this.dateCoQuanThue = dateCoQuanThue;
    }

    public String getDateTBGiaiTrinh1LT() {
        return dateTBGiaiTrinh1LT;
    }

    public void setDateTBGiaiTrinh1LT(String dateTBGiaiTrinh1LT) {
        this.dateTBGiaiTrinh1LT = dateTBGiaiTrinh1LT;
    }

    public String getDateTBGiaiTrinh1() {
        return dateTBGiaiTrinh1;
    }

    public void setDateTBGiaiTrinh1(String dateTBGiaiTrinh1) {
        this.dateTBGiaiTrinh1 = dateTBGiaiTrinh1;
    }

    public String getDateGiaiTrinh1LT() {
        return dateGiaiTrinh1LT;
    }

    public void setDateGiaiTrinh1LT(String dateGiaiTrinh1LT) {
        this.dateGiaiTrinh1LT = dateGiaiTrinh1LT;
    }

    public String getDateGiaiTrinh1() {
        return dateGiaiTrinh1;
    }

    public void setDateGiaiTrinh1(String dateGiaiTrinh1) {
        this.dateGiaiTrinh1 = dateGiaiTrinh1;
    }

    public String getDateTBGiaiTrinh2LT() {
        return dateTBGiaiTrinh2LT;
    }

    public void setDateTBGiaiTrinh2LT(String dateTBGiaiTrinh2LT) {
        this.dateTBGiaiTrinh2LT = dateTBGiaiTrinh2LT;
    }

    public String getDateTBGiaiTrinh2() {
        return dateTBGiaiTrinh2;
    }

    public void setDateTBGiaiTrinh2(String dateTBGiaiTrinh2) {
        this.dateTBGiaiTrinh2 = dateTBGiaiTrinh2;
    }

    public String getDateGiaiTrinh2LT() {
        return dateGiaiTrinh2LT;
    }

    public void setDateGiaiTrinh2LT(String dateGiaiTrinh2LT) {
        this.dateGiaiTrinh2LT = dateGiaiTrinh2LT;
    }

    public String getDateGiaiTrinh2() {
        return dateGiaiTrinh2;
    }

    public void setDateGiaiTrinh2(String dateGiaiTrinh2) {
        this.dateGiaiTrinh2 = dateGiaiTrinh2;
    }

    public String getDateXuLyLT() {
        return dateXuLyLT;
    }

    public void setDateXuLyLT(String dateXuLyLT) {
        this.dateXuLyLT = dateXuLyLT;
    }

    public String getDateXuLy() {
        return dateXuLy;
    }

    public void setDateXuLy(String dateXuLy) {
        this.dateXuLy = dateXuLy;
    }

    public String getDateBHQDLT() {
        return dateBHQDLT;
    }

    public void setDateBHQDLT(String dateBHQDLT) {
        this.dateBHQDLT = dateBHQDLT;
    }

    public String getDateBHQD() {
        return dateBHQD;
    }

    public void setDateBHQD(String dateBHQD) {
        this.dateBHQD = dateBHQD;
    }

    public String getDateKiemTraDNLT() {
        return dateKiemTraDNLT;
    }

    public void setDateKiemTraDNLT(String dateKiemTraDNLT) {
        this.dateKiemTraDNLT = dateKiemTraDNLT;
    }

    public String getDateKiemTraDN() {
        return dateKiemTraDN;
    }

    public void setDateKiemTraDN(String dateKiemTraDN) {
        this.dateKiemTraDN = dateKiemTraDN;
    }

    public DoanhNghiep getMaSoThue() {
        return maSoThue;
    }

    public void setMaSoThue(DoanhNghiep maSoThue) {
        this.maSoThue = maSoThue;
    }

    public KetQua getKetQua() {
        return ketQua;
    }

    public void setKetQua(KetQua ketQua) {
        this.ketQua = ketQua;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (stt != null ? stt.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof HoSo)) {
            return false;
        }
        HoSo other = (HoSo) object;
        if ((this.stt == null && other.stt != null) || (this.stt != null && !this.stt.equals(other.stt))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "org.home.tax.model.HoSo[ stt=" + stt + " ]";
    }
    
}
